6ccdcc836fb240fb99e0729dd1fdaa0b451dd8fb,ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java,AgentResource,register,#Register#HttpServletRequest#,78

Before Change


      throws WebApplicationException, AmbariException, InvalidStateTransitionException {
    /* Call into the heartbeat handler */

    RegistrationResponse response = hh.handleRegistration(message);
    LOG.debug("Sending registration response " + response);
    return response;
  }

After Change



    RegistrationResponse response = null;
    try {
      response = hh.handleRegistration(message);
      LOG.debug("Sending registration response " + response);
    } catch (AmbariException ex) {
      response = new RegistrationResponse();
      response.setResponseId(-1);